﻿using ShoppingEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static ShoppingEntity.UserInfo;

namespace IShoppingBll
{
    public interface IUserInfoBll : IBaseDeleteBll<UserInfo>
    {
        /// <summary>
        /// 用户信息列表展示
        /// </summary>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <param name="count"></param>
        /// <param name="userName"></param>
        /// <param name="phoneNum"></param>
        /// <returns></returns>
        object GetUserInfoListByPage(int page, int limit, out int count, string userName, string phoneNum);

        /// <summary>
        /// 修改用户信息
        /// </summary>
        /// <param name="userInfoId"></param>
        /// <param name="userName"></param>
        /// <param name="sex"></param>
        /// <param name="phoneNum"></param>
        /// <param name="address"></param>
        /// <returns></returns>
        bool UpdateUserInfo(string userInfoId, string userName, int sex, string phoneNum, string address);


        /// <summary>
        /// 用户下拉选
        /// </summary>
        /// <returns></returns>
        object GetUserInfoSelectOption();
        UserInfo GetUserInfoByLogin(string account, string pwdMD5);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="oldpwdMd5"></param>
        /// <param name="newpwdMd5"></param>
        /// <param name="userInfo"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        bool EditPassword(string oldPassword, string newPassword, UserInfo userInfo, out string msg);


        /// <summary>
        /// 查询出当前用户绑定的角色
        /// </summary>
        /// <param name="iD"></param>
        /// <returns></returns>
        object IsUserRole(string UserID);


        /// <summary>
        /// 注册商家配送员审批
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        bool AddUserInfo(UserInfo entity);


        /// <summary>
        /// 待审批用户视图
        /// </summary>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <param name="count"></param>
        /// <param name="userName"></param>
        /// <returns></returns>
        object GetApproverUserInfoListByPage(int page, int limit, out int count, string userName, UserInfoRoleInfoEnum UserInfoRole);



        /// <summary>
        /// 同意审批注册的用户
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        bool TurnApproverUserInfo(string userID);


        /// <summary>
        /// 驳回审批
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        bool ConsentApproverUserInfo(string userID);





    }
}
